# 基础镜像
FROM       centos:centos7.4.1708
# 维护者
MAINTAINER tttlkkkl <yehong0000@163.com>
# 定义一个变量
ENV TZ "Asia/Shanghai"
ENV TERM xterm

# 复制文件，ADD命令比copy功能更丰富，copy只能是将本地文件复制进去
ADD aliyun-mirror.repo /etc/yum.repos.d/CentOS-Base.repo
ADD aliyun-epel.repo /etc/yum.repos.d/epel.repo

# 需要执行的命令
RUN yum install -y curl wget tar bzip2 unzip vim-enhanced passwd sudo yum-utils hostname net-tools rsync man && \
    yum install -y gcc gcc-c++ git make automake cmake patch logrotate python-devel libpng-devel libjpeg-devel && \
    yum install -y --enablerepo=epel pwgen python-pip && \
    yum clean all
# 安装进程管理器
RUN pip install supervisor
ADD supervisord.conf /etc/supervisord.conf

RUN mkdir -p /etc/supervisor.conf.d && \
    mkdir -p /var/log/supervisor

# 定义容器端口
EXPOSE 22

# 容器启动时运行的命令,这里启动进程管理器
ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
